<!doctype html>
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <title>社会关系信息查看</title>
    <script src="/webjars/miniui/boot.js" type="text/javascript"></script>
    <link href="/static/css/resource.css" rel="stylesheet" type="text/css" />
    <script src="/static/js/common/common.js" type="text/javascript"></script>
    <link href="/webjars/miniui/css/demo.css" rel="stylesheet" type="text/css" />
    <link href="/static/css/default.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="mini-fit">
    <div style="height:100%;width: 100%;overflow-x: auto;overflow-y: auto;">
        <input name="priNum" id="priNum" class="mini-hidden" style="width: 100%" readonly />
        <div class="legend" style="font-size: 16px">基本信息:</div>
        <div style="width:1250px;">
        </div>
        <form id="form3" method="post" style="margin-left: 10px;padding-bottom: 15px;">
            <div class="legend" style="font-size: 16px">配偶、父母或其他:</div>

            <div style="width:1250px;">
            </div>
            <div id="grid3" class="mini-datagrid" style="width:1250px;height:210px;" sizeList="[5]" pageSize="5"
                 url="/azbj/social/srlistexcel" idField="id"
                 selectOnLoad="true">
                <div property="columns">
                    <div field="thename" width="35" headerAlign="center" align="center">姓名</div>
                    <div field="relation" width="35" headerAlign="center" align="center">关系</div>
                    <div field="age" width="35" headerAlign="center" align="center">出生日期</div>
                    <div field="danwei" width="35" headerAlign="center" align="center">工作单位</div>
                    <div field="addr" width="40" headerAlign="center" align="center">家庭住址</div>
                    <div field="tel" width="35" headerAlign="center" align="center">电话</div>
                    <div name="action" headerAlign="center" align="center" renderer="onActionRenderer"
                         cellStyle="padding:0;" width="35"
                         allowSort="false" multiSelect="false">操作
                    </div>
                </div>
            </div>
        </form>

        <form id="form1" method="post" style="margin-left: 10px;">
            <div class="legend" style="font-size: 16px">未成年子女信息:</div>

            <div style="width:1250px;">
                <div id="grid1" class="mini-datagrid" style="   width:1250px;height:210px;" sizeList="[5]" pageSize="5"
                     url="/azbj/noadult/listexcel"
                >
                    <div property="columns">
                        <div field="name" width="35" headerAlign="center" align="center">姓名</div>
                        <div field="sex" width="35" headerAlign="center" align="center">性别</div>
                        <div field="age" width="35" headerAlign="center" align="center">出生日期</div>
                        <div field="kunnan" width="35" headerAlign="center" align="center">生活困难程度</div>
                        <div field="liulang" width="35" headerAlign="center" align="center">流浪社会</div>
                        <div field="jianhuren" width="35" headerAlign="center" align="center">监护人</div>
                        <div field="shixue" width="35" headerAlign="center" align="center">失学</div>
                        <div field="fanzui" width="35" headerAlign="center" align="center">违法行为</div>
                        <div field="znsfid" width="50" headerAlign="center" align="center">身份证号</div>
                        <div field="hujidi" width="50" headerAlign="center" align="center">户籍地</div>
                        <div field="juzhudi" width="50" headerAlign="center" align="center">居住地址</div>
                        <div name="action" headerAlign="center" align="center" renderer="onActionRendere"
                             cellStyle="padding:0;" width="35"
                             allowSort="false" multiSelect="false">操作
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>
<script type="text/javascript">
    mini.parse();
    var form1 = new mini.Form("form1");
    var form3 = new mini.Form("form3");
    var grid1 = mini.get("grid1");
    var grid3 = mini.get("grid3");
    var priNum = mini.get("priNum");

    function onActionRenderer(e) {
        var s = '';
        s += '&nbsp;<a class="mini-button mini-button-info"   href="javascript:lookInfo();" >&nbsp;&nbsp;查看&nbsp;&nbsp;</a>&nbsp';
        return s;
    }

    function lookInfo() {
        var row = grid3.getSelected();
        if (row) {
            mini.open({
                url: "/azbj/social-relations/srlook/viewexcel?prinum=" + row.id,
                title: "配偶、父母或其他信息查看", width: 1000, height: 400,
                onload: function () {
                    var iframe = this.getIFrameEl();
                    var data = {action: "edit", id: row.id};
                    iframe.contentWindow.SetData(data);
                },
                ondestroy: function (action) {
                    grid3.reload();
                }
            });
        } else {
            mini.alert("请选中一条记录");
        }
    }

    function onActionRendere(e) {
        var s = '';
        s += '&nbsp;<a class="mini-button mini-button-info" href="javascript:lookInfo1();" >&nbsp;&nbsp;查看&nbsp;&nbsp;</a>&nbsp';
        return s;
    }

    function lookInfo1() {
        var row = grid1.getSelected();
        if (row) {
            mini.open({
                url: "/azbj/social-relations/noadultlook/viewexcel",
                title: "未成年子女信息查看", width: 1000, height: 400,
                onload: function () {
                    var iframe = this.getIFrameEl();
                    var data = {action: "edit", id: row.id};
                    iframe.contentWindow.SetData(data);
                },
                ondestroy: function (action) {
                    grid1.reload();
                }
            });
        } else {
            mini.alert("请选中一条记录");
        }
    }

    window.onload = function () {

        priNum.setValue(${priNum!''});
        grid1.load({querykey: priNum.getValue()});
        grid3.load({priNum: priNum.getValue()});
        form1.setEnabled(false);
        form3.setEnabled(false);
    }
</script>
</body>
</html>